{extend name="admin@index_layout"/}
{block name="main"}
<div class="layui-card">
    <div class="layui-card-header">模板管理</div>
    <div class="layui-card-body">
        <div class="layui-form">
            <table class="layui-hide" id="currentTable" lay-filter="currentTable"></table>
        </div>
    </div>
</div>
<script type="text/html" id="barTool">
    <a data-open='{:url("info")}?path={{ d.path }}' class="layui-btn layui-btn-xs" title="{{ d.path }}列表" data-full="true">查看</a>
</script>
{/block}
{block name="script"}
<script>
layui.use(['yznTable'], function() {
    var table = layui.yznTable;

    var init = {
        table_elem: '#currentTable',
    };

    table.render({
        init: init,
        limit: 100,
        id: 'currentTable',
        toolbar: ['refresh'],
        url: '{:url("index")}',
        cols: [
            [
                { field: 'url', align: "left", title: '路径' },
                { fixed: 'right', width: 150, title: '操作', toolbar: '#barTool' }
            ]
        ],
        page: {}
    });
});
</script>
{/block}